﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HierarchicalClustering.Metrics;

namespace HierarchicalClustering.LinkageCriteria
{
    public interface ILinkage   // linkage criteria
    {
        // the distance between 2 clusters
        double Distance ( Cluster clusterA, Cluster clusterB, IMetric metric );

        // a weight in the distance (only used for the average linkage)
        double AddWeight ( Cluster clusterA, Cluster clusterB, double distance );

        // the new distance between a merged cluster and another one
        double NewDistance ( double distanceA, double distanceB );
        // lets say that the merged document consists of the cluster 1 and cluster 2
        // and we want to compute the distance to cluster 3. Then:
        // distanceA: the distance between cluster 1 and cluster 3
        // distanceB: the distance between cluster 2 and cluster 3
    }
}
